import React, { memo, useState } from 'react';
import classNames from 'classnames';
import Login from './components/Login';
import CompanyRegister from './components/CompanyRegister';
import StaffRegister from './components/StaffRegister';
import LoginHeader from './components/Header';
import { useAppSelector } from 'modules/store';
import { selectGlobal } from 'modules/global';

import Style from './index.module.less';

export default memo(() => {
  const [type, setType] = useState('company_register');
  const globalState = useAppSelector(selectGlobal);
  const { theme } = globalState;
  /**
   * 企业账号登陆 login
   * 设置企业信息 company_register
   * 输入企业邀请码 staff_register
   */

  return (
    <div
      className={classNames(Style.loginWrapper, { [Style.light]: theme === 'light', [Style.dark]: theme !== 'light' })}
    >
      <LoginHeader />
      <div className={Style.bodyContainer}>
        <div className={Style.loginContainer}>
          <Login />
        </div>

        <footer className={Style.copyright}>Copyright @ 2021-2025 xxx. All Rights Reserved</footer>
      </div>
    </div>
  );
});
